<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>简单的前后端交互</title>
</head>
<body>
   <div>
       {% if age >18 %}
       <div>已经18岁可以进入网吧</div>
       {% elif age == 18%}
       <div>18岁，需要父母陪同</div>
       {% elif age < 18%}
       <div>小于18岁if，nononono</div>
       {% endif %}
    </div>
<div>
    {% for book in books %}
    <div>图书名称：{{book.name}}，图书作者{{book.author}}</div>
    {% endfor%}
</div>
</body>
</html>